<div class="survey analyze clearfloat" style="display: none;" id="zcfxBox">
<h1 class="surveyName">指标分析</h1>
<ul class="surveyList clearfloat">
	<li class="surveyListC" onclick="showZcfx(this)" >造价组成分析</li>
	<li onclick="showFbfx()">分部分项组成分析图</li>
</ul>
<hr class="layui-bg-gray" style="width:900px;margin:auto"/>
<div class="Allsurvey">
	<h1 class="SingleProjectName">单项工程名称：</h1>
	<div class="cost-item">
		<div class="layui-tab SingleProjectTab">
			<ul class="layui-tab-title" id="zjzcfxTab"></ul>
			<div class="layui-tab-content" id="zjzcfxTabItemHtml">
				
			</div>
		</div>
	</div>
</div>
</div>
<script>
	var showZcfx = function(e) {
		$(e).addClass("surveyListC").siblings().removeClass("surveyListC");
	}
	var showFbfx = function(e) {
		var scroll_offset = $(".layui-show").find(".clearfloat").offset();
	    var scroll=scroll_offset.top-100;
		    $("body,html").animate({ 
		scrollTop:scroll //让body的scrollTop等于pos的top，就实现了滚动 
		},0);
//		$(e).addClass("surveyListC").siblings().removeClass("surveyListC");
	}
</script>
<script type="text/html" id="zjzcfxTabItem">
    <div class="layui-tab-item">
	<table class="item-top">
		<thead class="">
			<tr>
				<th>序号</th>
				<th>工程名称</th>
				<th>造价(万元)</th>
				<th>百分比<br />(%)</th>
				<th>分部分项工程费<br />(万元)</th>
				<th>措施项目费<br />(万元)</th>
				<th>其他项目费<br />(万元)</th>
				<th>规费税金<br />(万元)</th>
			</tr>
			
		</thead>
		<tbody >
			{{# var costTotal =0 }}
			{{# for (var i = 0;i < d.length;i++){ }}
				 {{# costTotal +=Number(d[i].costTotal || 0)}}
			{{# } }}
			{{# for (var i = 0;i < d.length;i++){ }}
				<tr>
					<td>{{Number(d[i].number || 1 )}}</td>
					<td class="uniName">{{d[i].unitName ||  d[i].name}}</td>
					<td>{{Number(d[i].costTotal|| costTotal)}}</td>
					{{# if(d[i].costTotal != null | d[i].costTotal != undefined ){ }}
					   <td>{{ (d[i].costTotal/costTotal * 100).toFixed(2)}}</td>
					{{# }else{ }}
					   <td>{{ '100' }}</td>
					{{# } }}
					<td>{{Number(d[i].infoTotal || 0).toFixed(2)}}</td>
					<td>{{Number(d[i].measuresTotal || 0).toFixed(2)}}</td>
					<td>{{Number(d[i].otherTotal|| 0).toFixed(2)}}</td>
					<td>{{Number(d[i].taxesTotal|| 0 ).toFixed(2)}}</td>
				</tr>
			{{# } }}
		</tbody>
	</table>
	<div class="item-bottom">
		<div class="item-container-pie" style="height: 400px"></div>
		<div class="item-container-column" style="height: 400px"></div>
	</div>
	<div class="cost-item clearfloat"  >
		<div class="nav-tree fl">
			<ul class="tit">全部</ul>
			<ul class="nav-list" id="softwareNav">
				{{# for (var i = 0;i < d.length;i++){ }}
				   <li  data-costid="{{d[i].costId}}"  data-majorid="{{d[i].majorId}}" onclick="changeSlender(this)">{{d[i].unitName ||  d[i].name}}</li>
				{{# } }}
			</ul>
		</div>
		<div class="item-container-bar" class="fr" style="width: 550px;float: left;" data-highcharts-chart="2"></div>
	</div>
</div>
</script>